﻿(function($){
	$.extend($,{
		websocket:{
		    ups:'ffffff100000f0f8',
		    yg:'ffffff100000631d', //2号机柜内烟感探测
		    yg1:'ffffff1000006808',//9号机柜内烟感探测
		    yg2:'ffffff10000069f6',//9号机柜上方烟感探测
		    yg3:'ffffff100000648f',//操作间烟感探测
		    yg4:'ffffff1000006672',//1号机柜上方烟感探测
		    hongwai:'ffffff100000c6fc',//红外
		    hwrt:'4f33c4d427cb1aac',//红外人体
		    hwgyq:'ffffff100000c6fc',//红外感应器数据
		    menci:'93ce2e63d4ef266b',//门磁??????
			sddly:'ffffff100000f109',//市电输入
		    wenshidu1:'ffffff100000ef87',//1号机柜上方温湿度监测
		    wenshidu2:'ffffff100000f2cf',//4号机柜内温湿度监测
		    wenshidu3:'ffffff100000f2d0',//9号机柜上方温湿度监测
		    wenshidu4:'ffffff100000f308',//8号机柜内温湿度监测
		    wenshidu5:'ffffff100000f343',//6号机柜内温湿度监测
		    wenshidu6:'ffffff100000f368',//操作间温湿度监测
		    wenshidu7:'ffffff100000f36c',//10号机柜内温湿度监测
		    wenshidu8:'ffffff100000f37b',//2号机柜内温湿度监测
		    kongtiao1:'ffffff100000f110',//空调1
		    kongtiao2:'ffffff100000f10d',//空调2
		    dly:'ffffff100000f108',//电量仪
		    xfxt:'ffffff100000f107',//新风系统监控
		    kgl:'ffffff100000f10f',//ad88
		    kglad88:'ffffff100000f0f9',//开关量
		    xfkzq:'ffffff100000f1071',//新风控制器数据
			socketMsgs:{},
			sddlyall:{},
			upsall:{},
			ygall:{},//2号机柜内烟感探测
			yg1all:{},//9号机柜内烟感探测
			yg2all:{},//9号机柜上方烟感探测
			yg3all:{},//操作间烟感探测
			yg4all:{},//1号机柜上方烟感探测
			hongwaiall:{},//红外
			hwrtall:{},//红外人体
			hwgyqall:{},//红外感应器数据
			menciall:{},//门磁??????

			wenshidu1all:{},//1号机柜上方温湿度监测
			wenshidu2all:{},//4号机柜内温湿度监测
			wenshidu3all:{},//9号机柜上方温湿度监测
			wenshidu4all:{},//8号机柜内温湿度监测
			wenshidu5all:{},//6号机柜内温湿度监测
			wenshidu6all:{},//操作间温湿度监测
			wenshidu7all:{},//10号机柜内温湿度监测
			wenshidu8all:{},//2号机柜内温湿度监测

			kongtiao1all:{},//空调1
			kongtiao2all:{},//空调2
			dlyall:{},//电量仪
			xfxtall:{},//新风系统监控
			kglall:{},//ad88
			kglad88all:{},//开关量
			xfkzqall:{},//新风控制器数据
			kt1:{},//kongt
			xinkai:{},//kongt
			kt2:{},//新风控制器数据
			processsor:function(socketMsg) {
				$.websocket.socketMsgs=socketMsg
                var entity=JSON.parse(socketMsg.entity)

					if(entity.equipmentid==$.websocket.xfkzq){//新风控制器数据

						//	$.websocket.xfkzqall=entity
						entity.success=socketMsg.success
						$.websocket.xfkzqall=entity

						if(entity.success){
							$("#equipentAll_table span[name='xfj']").css("background-color","red");
						}else {
							$("#equipentAll_table span[name='xfj']").css("background-color","green");
						}
						$("#freshAirContolAirConditioning_table span[name='softwareversion']").text(entity.softwareversion);
						$("#freshAirContolAirConditioning_table span[name='hardwareversion']").text(entity.hardwareversion);
						$("#freshAirContolAirConditioning_table span[name='datalength']").text(entity.datalength);
						$("#freshAirContolAirConditioning_table span[name='messagetype']").text(entity.messagetype);
						if(entity.isconfig==0){
							$("#freshAirContolAirConditioning_table span[name='isconfig']").text('失败');
						}else {
							$("#freshAirContolAirConditioning_table span[name='isconfig']").text('成功');
							$("#freshAirContolAirConditioning_table span[name='isconfig']").css('color','#00ff0c');
						}
						if(entity.commitmentstate==0){
							$("#freshAirContolAirConditioning_table span[name='commitmentstate']").text('未启动');
						}else {
							$("#freshAirContolAirConditioning_table span[name='commitmentstate']").text('已启动');
							$("#freshAirContolAirConditioning_table span[name='commitmentstate']").css('color','#00ff0c');
						}
						if(entity.pattern=='00'){
							//$("#freshAirContolAirConditioning_table span[name='pattern']").css('color','#00ff0c');
							$("#freshAirContolAirConditioning_table span[name='pattern']").text('制冷');
						}else if(entity.pattern=='01') {
							$("#freshAirContolAirConditioning_table span[name='pattern']").text('制热');
						}else if(entity.pattern=='10') {
							$("#freshAirContolAirConditioning_table span[name='pattern']").text('除霜');
						}else if(entity.pattern=='11') {
							$("#freshAirContolAirConditioning_table span[name='pattern']").text('通风');
						}
						if(entity.windspeed=='00'){
							$("#freshAirContolAirConditioning_table span[name='windspeed']").text('低档');
						}else if(entity.windspeed=='01') {
							$("#freshAirContolAirConditioning_table span[name='windspeed']").text('中档');
						}else if(entity.windspeed=='10') {
							$("#freshAirContolAirConditioning_table span[name='windspeed']").text('高速');
						}else if(entity.windspeed=='11') {
							$("#freshAirContolAirConditioning_table span[name='windspeed']").text('自动');
						}
						if(entity.panelstate=='00'){
							$("#freshAirContolAirConditioning_table span[name='panelstate']").text('关机');
						}else if(entity.panelstate=='01') {
							$("#freshAirContolAirConditioning_table span[name='panelstate']").text('开机');
						}else if(entity.panelstate=='10') {
							$("#freshAirContolAirConditioning_table span[name='panelstate']").text('关屏');
						}
						if(entity.usestate==0){
							$("#freshAirContolAirConditioning_table span[name='usestate']").text('停用');
						}else {
							$("#freshAirContolAirConditioning_table span[name='usestate']").css('color','#00ff0c');
							$("#freshAirContolAirConditioning_table span[name='usestate']").text('启用');
						}
						$("#freshAirContolAirConditioning_table span[name='lockstate']").text(entity.lockstate);
						if(entity.temperatureprobestate=='00'){
							$("#freshAirContolAirConditioning_table span[name='panelstate']").text('正常');
						}else if(entity.temperatureprobestate=='01') {
							$("#freshAirContolAirConditioning_table span[name='panelstate']").text('短路');
						}else if(entity.temperatureprobestate=='10') {
							$("#freshAirContolAirConditioning_table span[name='panelstate']").text('开路');
						}
						$("#freshAirContolAirConditioning_table span[name='temperaturedecimal']").text(entity.temperaturedecimal);
						$("#freshAirContolAirConditioning_table span[name='temperatureinteger']").text(entity.temperatureinteger);
						$("#freshAirContolAirConditioning_table span[name='configtempinteger']").text(entity.configtempinteger);
						if(entity.requestflag=='00'){
							$("#freshAirContolAirConditioning_table span[name='requestflag']").text('不请求');
						}else if(entity.requestflag=='01') {

							$("#freshAirContolAirConditioning_table span[name='requestflag']").text('请求');
						}
					}

		        if(entity.equipmentid==$.websocket.ups){//ups状态

		        	//$.websocket.upsall=entity

					entity.success=socketMsg.success
					$.websocket.upsall=entity
					if(entity.success){
						$("#equipentAll_table span[name='ups']").css("background-color","red");
					}else {
						$("#equipentAll_table span[name='ups']").css("background-color","green");
					}
					$("#upsState_table span[name='acInCurrenta']").text(entity.acInCurrenta.toFixed(2));
					$("#upsState_table span[name='acInCurrentb']").text(entity.acInCurrentb.toFixed(2));
					$("#upsState_table span[name='acInCurrentc']").text(entity.acInCurrentc.toFixed(2));

					$("#upsState_table span[name='acRatea']").text(entity.acRatea.toFixed(2));
					$("#upsState_table span[name='acRateb']").text(entity.acRateb.toFixed(2));
					$("#upsState_table span[name='acRatec']").text(entity.acRatec.toFixed(2));

					$("#upsState_table span[name='acInCurrenta']").text(entity.acInCurrenta.toFixed(2));
					$("#upsState_table span[name='acInCurrentb']").text(entity.acInCurrentb.toFixed(2));
					$("#upsState_table span[name='acInCurrentc']").text(entity.acInCurrentc.toFixed(2));

					$("#upsState_table span[name='acInVoltagea']").text(entity.acInVoltagea.toFixed(2));
					$("#upsState_table span[name='acInVoltageb']").text(entity.acInVoltageb.toFixed(2));
					$("#upsState_table span[name='acInVoltagec']").text(entity.acInVoltagec.toFixed(2));
					$("#upsState_table span[name='acInPha']").text(entity.acInPha.toFixed(2));
					$("#upsState_table span[name='acInPhb']").text(entity.acInPhb.toFixed(2));
					$("#upsState_table span[name='acInPhc']").text(entity.acInPhc.toFixed(2));
					$("#upsState_table span[name='acOutVoltagea']").text(entity.acOutVoltagea.toFixed(2));
					$("#upsState_table span[name='acOutVoltageb']").text(entity.acOutVoltageb.toFixed(2));
					$("#upsState_table span[name='acOutVoltagec']").text(entity.acOutVoltagec.toFixed(2));
					$("#upsState_table span[name='acInRatea']").text(entity.acInRatea.toFixed(2));
					$("#upsState_table span[name='acInRateb']").text(entity.acInRateb.toFixed(2));
					$("#upsState_table span[name='acInRatec']").text(entity.acInRatec.toFixed(2));
					$("#upsState_table span[name='acOutCurrenta']").text(entity.acOutCurrenta.toFixed(2));
					$("#upsState_table span[name='acOutCurrentb']").text(entity.acOutCurrentb.toFixed(2));
					$("#upsState_table span[name='acOutCurrentc']").text(entity.acOutCurrentc.toFixed(2));
					$("#upsState_table span[name='loadPercentagea']").text(entity.loadPercentagea.toFixed(2));
					$("#upsState_table span[name='loadPercentageb']").text(entity.loadPercentageb.toFixed(2));
					$("#upsState_table span[name='loadPercentagec']").text(entity.loadPercentagec.toFixed(2));
					$("#upsState_table span[name='outEffectivePowera']").text(entity.outEffectivePowera.toFixed(2));
					$("#upsState_table span[name='outEffectivePowerb']").text(entity.outEffectivePowerb.toFixed(2));
					$("#upsState_table span[name='outEffectivePowerc']").text(entity.outEffectivePowerc.toFixed(2));
					$("#upsState_table span[name='outInvalidPowera']").text(entity.outInvalidPowera.toFixed(2));
					$("#upsState_table span[name='outInvalidPowerb']").text(entity.outInvalidPowerb.toFixed(2));
					$("#upsState_table span[name='outInvalidPowerc']").text(entity.outInvalidPowerc.toFixed(2));
					$("#upsState_table span[name='acOutRatea']").text(entity.acOutRatea.toFixed(2));
					$("#upsState_table span[name='acOutRateb']").text(entity.acOutRateb.toFixed(2));
					$("#upsState_table span[name='acOutRatec']").text(entity.acOutRatec.toFixed(2));
					$("#upsState_table span[name='outLookPowera']").text(entity.outEffectivePowera.toFixed(2));
					$("#upsState_table span[name='outLookPowerb']").text(entity.outEffectivePowerb.toFixed(2));
					$("#upsState_table span[name='outLookPowerc']").text(entity.outEffectivePowerc.toFixed(2));
					$("#upsState_table span[name='acVoltagea']").text(entity.outEffectivePowera.toFixed(2));
					$("#upsState_table span[name='acVoltageb']").text(entity.outEffectivePowerb.toFixed(2));
					$("#upsState_table span[name='acVoltagec']").text(entity.outEffectivePowerc.toFixed(2));
					$("#upsState_table span[name='acCurrenta']").text(entity.acCurrenta.toFixed(2));
					$("#upsState_table span[name='acCurrentb']").text(entity.acCurrentb.toFixed(2));
					$("#upsState_table span[name='acCurrentc']").text(entity.acCurrentc.toFixed(2));
					$("#upsState_table span[name='acOutPha']").text(entity.acOutPha.toFixed(2));
					$("#upsState_table span[name='acOutPhb']").text(entity.acOutPhb.toFixed(2));
					$("#upsState_table span[name='acOutPhc']").text(entity.acOutPhc.toFixed(2));
					$("#upsState_table span[name='envTemperature']").text(entity.envTemperature.toFixed(2));
					$("#upsState_table span[name='positiveBatteryVoltage']").text(entity.positiveBatteryVoltage.toFixed(2));
					$("#upsState_table span[name='negativeBatteryVoltage']").text(entity.negativeBatteryVoltage.toFixed(2));
					$("#upsState_table span[name='batteryTemperature']").text(entity.batteryTemperature);
					$("#upsState_table span[name='batteryRemainCapacity']").text(entity.batteryRemainCapacity);
					$("#upsState_table span[name='batteryCapacity']").text(entity.batteryCapacity);


					if(entity.field81==0){
						$("#upsState_table span[name='field81']").text("均不供电");
					}else if(entity.field81==1){
						$("#upsState_table span[name='field81']").text("ups供电");
					}else  if(entity.field81==2){
						$("#upsState_table span[name='field81']").text("旁路供电");
					}
					if(entity.field82==0){
						$("#upsState_table span[name='field82']").text("电池为工作");
					}else if(entity.field82==1){
						$("#upsState_table span[name='field82']").text("电池浮充");
					}else  if(entity.field82==2){
						$("#upsState_table span[name='field82']").text("电池均充");
					}else if(entity.field82==3) {
						$("#upsState_table span[name='field82']").text("电池放电");
					}
					if(entity.field99==0){
						$("#upsState_table span[name='field99']").text("未自检");
					}else {
						$("#upsState_table span[name='field99']").text("成功");
					}
					if(entity.field83==0){
						$("#upsState_table span[name='field83']").css("background-color","red");
					}else {
						$("#upsState_table span[name='field83']").css("background-color","green");
					}
					if(entity.field84==1){
						$("#upsState_table span[name='field84']").css("background-color","red");
					}else {
						$("#upsState_table span[name='field84']").css("background-color","green");
					}
					if(entity.field89==1){
						$("#upsState_table span[name='field89']").css("background-color","red");
					}else {
						$("#upsState_table span[name='field89']").css("background-color","green");
					}
					if(entity.field90==1){
						$("#upsState_table span[name='field90']").css("background-color","red");
					}else {
						$("#upsState_table span[name='field90']").css("background-color","green");
					}
					if(entity.field94==1){
						$("#upsState_table span[name='field94']").css("background-color","red");
					}else {
						$("#upsState_table span[name='field94']").css("background-color","green");
					}
					if(entity.field95==1){
						$("#upsState_table span[name='field95']").css("background-color","red");
					}else {
						$("#upsState_table span[name='field95']").css("background-color","green");
					}
					if(entity.field108==1){
						$("#upsState_table span[name='field108']").css("background-color","red");
					}else {
						$("#upsState_table span[name='field108']").css("background-color","green");
					}
					if(entity.field110==1){
						$("#upsState_table span[name='field110']").css("background-color","red");
					}else {
						$("#upsState_table span[name='field110']").css("background-color","green");
					}
					if(entity.field86==1){
						$("#upsState_table span[name='field86']").css("background-color","red");
					}else {
						$("#upsState_table span[name='field86']").css("background-color","green");
					}
					if(entity.field87==1){
						$("#upsState_table span[name='field87']").css("background-color","red");
					}else {
						$("#upsState_table span[name='field87']").css("background-color","green");
					}
					if(entity.field91==1){
						$("#upsState_table span[name='field91']").css("background-color","red");
					}else {
						$("#upsState_table span[name='field91']").css("background-color","green");
					}
					if(entity.field92==1){
						$("#upsState_table span[name='field92']").css("background-color","red");
					}else {
						$("#upsState_table span[name='field92']").css("background-color","green");
					}
					if(entity.field96==1){
						$("#upsState_table span[name='field96']").css("background-color","red");
					}else {
						$("#upsState_table span[name='field96']").css("background-color","green");
					}
					if(entity.field97==1){
						$("#upsState_table span[name='field97']").css("background-color","red");
					}else {
						$("#upsState_table span[name='field97']").css("background-color","green");
					}
					if(entity.field111==1){
						$("#upsState_table span[name='field111']").css("background-color","red");
					}else {
						$("#upsState_table span[name='field111']").css("background-color","green");
					}
					if(entity.field88==1){
						$("#upsState_table span[name='field88']").css("background-color","red");
					}else {
						$("#upsState_table span[name='field88']").css("background-color","green");
					}
					if(entity.field93==1){
						$("#upsState_table span[name='field93']").css("background-color","red");
					}else {
						$("#upsState_table span[name='field93']").css("background-color","green");
					}
					if(entity.field107==1){
						$("#upsState_table span[name='field107']").css("background-color","red");
					}else {
						$("#upsState_table span[name='field107']").css("background-color","green");
					}
                }

				if(entity.equipmentid==$.websocket.yg){//2号机柜内烟感探测

					//$.websocket.ygall=entity
					entity.success=socketMsg.success
					$.websocket.ygall=entity
					if(entity.success){
						$("#equipentAll_table span[name='yg2']").css("background-color","red");
						$("#accessControl_table span[name='cztstate']").css("background-color","red");
					}else {
						$("#accessControl_table span[name='cztstate']").css("background-color","green");
						$("#equipentAll_table span[name='yg2']").css("background-color","green");
					}

					if (entity.state == '020000') {
						$("#accessControl_table span[name='cztstate']").css('color', 'green');
					} else {
						$("#accessControl_table span[name='cztstate']").css('color', 'red');
					}
					$("#accessControl_table span[name='cztvoltage']").text(entity.voltage.toFixed(2));

				}
				if(entity.equipmentid==$.websocket.yg1){//9号机柜内烟感探测

					//$.websocket.yg1all=entity
					entity.success=socketMsg.success
					$.websocket.yg1all=entity
					if(entity.success){
						$("#equipentAll_table span[name='yg9']").css("background-color","red");
					}else {
						$("#equipentAll_table span[name='yg9']").css("background-color","green");
					}
					if (entity.state == '020000') {
						$("#accessControl_table span[name='state1']").css('color', 'green');
					} else {
						$("#accessControl_table span[name='state1']").css('color', 'red');
					}


					$("#accessControl_table span[name='voltage1']").text(entity.voltage.toFixed(2));

				}
				if(entity.equipmentid==$.websocket.yg2){//9号机柜上方烟感探测

					//$.websocket.yg2all=entity
					entity.success=socketMsg.success
					$.websocket.yg2all=entity
					if(entity.success){
						$("#equipentAll_table span[name='hwgy']").css("background-color","red");
					}else {
						$("#equipentAll_table span[name='hwgy']").css("background-color","green");
					}
					if (entity.state == '020000') {
						$("#accessControl_table span[name='state9d']").css('color', 'green');
					} else {
						$("#accessControl_table span[name='state9d']").css('color', 'red');
					}
					$("#accessControl_table span[name='voltage9d']").text(entity.voltage.toFixed(2));

				}
				if(entity.equipmentid==$.websocket.yg3){//	操作间烟感探测

				//	$.websocket.yg3all=entity
					entity.success=socketMsg.success
					$.websocket.yg3all=entity
					if(entity.success){
						$("#equipentAll_table span[name='ygcz']").css("background-color","red");
					}else {
						$("#equipentAll_table span[name='ygcz']").css("background-color","green");
					}

					if (entity.state == '020000') {
						$("#accessControl_table span[name='state2']").css('color', 'green');
					} else {
						$("#accessControl_table span[name='state2']").css('color', 'red');
					}
					$("#accessControl_table span[name='voltage2']").text(entity.voltage.toFixed(2));

				}
				if(entity.equipmentid==$.websocket.yg4){//	1号机柜上方烟感探测

					//$.websocket.yg4all=entity
					entity.success=socketMsg.success
					$.websocket.yg4all=entity
					if(entity.success){
						$("#equipentAll_table span[name='yg1']").css("background-color","red");
					}else {
						$("#equipentAll_table span[name='yg1']").css("background-color","green");
					}
					if (entity.state == '020000') {
						$("#accessControl_table span[name='state9']").css('color', 'green');
					} else {
						$("#accessControl_table span[name='state9']").css('color', 'red');
					}
					$("#accessControl_table span[name='voltage9']").text(entity.voltage.toFixed(2));

				}

				if(entity.equipmentid==$.websocket.hongwai){//
					entity.success=socketMsg.success
					$.websocket.hongwaiall=entity
					if(entity.success){
						$("#accessControl_table span[name='hwgy']").css("background-color","red");
					}else {
						$("#accessControl_table span[name='hwgy']").css("background-color","green");
					}
					if(entity.success){
						$("#equipentAll_table span[name='hwgy']").css("background-color","red");
					}else {
						$("#equipentAll_table span[name='hwgy']").css("background-color","green");
					}

				}

				if(entity.equipmentid==$.websocket.menci){//门磁??????
					entity.success=socketMsg.success
					$.websocket.menciall=entity
					if(entity.success){
						$("#accessControl_table span[name='menc']").css("background-color","red");
					}else {
						$("#accessControl_table span[name='menc']").css("background-color","green");
					}
					if(entity.success){
						$("#equipentAll_table span[name='menc']").css("background-color","red");
					}else {
						$("#equipentAll_table span[name='menc']").css("background-color","green");
					}

/*
					//门磁感器数据
					if(entity.state=='00'){
						$("#cabinet_table span[name='state']").text('正常');
					}else {
						$("#cabinet_table span[name='state']").text('报警');
					}
					if(entity.sensorstate=='00'){
						$("#cabinet_table span[name='sensorstate']").text('正常');
					}else if(entity.sensorstate=='01'){
						$("#cabinet_table span[name='sensorstate']").text('故障');
					}
					if(entity.batterystate=='00'){
						$("#cabinet_table span[name='batterystate']").text('正常');
					}else if(entity.batterystate=='01'){
						$("#cabinet_table span[name='batterystate']").text('低电');
					}
					if(entity.tamperstate=='0'){
						$("#cabinet_table span[name='tamperstate']").text('正常');
					}else if(entity.tamperstate=='1'){
						$("#cabinet_table span[name='tamperstate']").text('被拆');
					}
					if(entity.keystate=='000'){
						$("#cabinet_table span[name='keystate']").text('正常');
					}else if(entity.keystate=='001'){
						$("#cabinet_table span[name='keystate']").text('测试');
					}
					$("#cabinet_table span[name='crchighbytes']").text(entity.crchighbytes);
					$("#cabinet_table span[name='crclowhbytes']").text(entity.crclowhbytes);
					$("#cabinet_table span[name='frametail']").text(entity.frametail)*/;
				}


				if(entity.equipmentid==$.websocket.wenshidu1){//1号机柜上方温湿度监测

					//$.websocket.wenshidu1all=entity
					entity.success=socketMsg.success
					$.websocket.wenshidu1all=entity
					if(entity.success){
						$("#equipentAll_table span[name='yg1s']").css("background-color","red");
					}else {
						$("#equipentAll_table span[name='yg1s']").css("background-color","green");
					}
					$("#humidtypeTmperature_table span[name='wtp1']").text(entity.temperature.toFixed(2));
					$("#humidtypeTmperature_table span[name='stp1']").text(entity.humidity.toFixed(2));
					$("#humidtypeTmperature_table span[name='voltage1']").text(entity.voltage.toFixed(2));
				}
				if(entity.equipmentid==$.websocket.wenshidu2){//4号机柜内温湿度监测

					//$.websocket.wenshidu2all=entity
					entity.success=socketMsg.success
					$.websocket.wenshidu2all=entity
					if(entity.success){
						$("#equipentAll_table span[name='wsd4']").css("background-color","red");
					}else {
						$("#equipentAll_table span[name='wsd4']").css("background-color","green");
					}
					$("#humidtypeTmperature_table span[name='wtp3']").text(entity.temperature.toFixed(2));
					$("#humidtypeTmperature_table span[name='stp3']").text(entity.humidity.toFixed(2));
					$("#humidtypeTmperature_table span[name='voltage3']").text(entity.voltage.toFixed(2));
				}
				if(entity.equipmentid==$.websocket.wenshidu3){//9号机柜上方温湿度监测

					//$.websocket.wenshidu3all=entity
					entity.success=socketMsg.success
					$.websocket.wenshidu3all=entity
					if(entity.success){
						$("#equipentAll_table span[name='wsd9']").css("background-color","red");
					}else {
						$("#equipentAll_table span[name='wsd9']").css("background-color","green");
					}
					$("#humidtypeTmperature_table span[name='wtp5']").text(entity.temperature.toFixed(2));
					$("#humidtypeTmperature_table span[name='stp5']").text(entity.humidity.toFixed(2));
					$("#humidtypeTmperature_table span[name='voltage5']").text(entity.voltage.toFixed(2));
				}
				if(entity.equipmentid==$.websocket.wenshidu4){//	8号机柜内温湿度监测

					//$.websocket.wenshidu4all=entity
					entity.success=socketMsg.success
					$.websocket.wenshidu4all=entity
					if(entity.success){
						$("#equipentAll_table span[name='wsd8']").css("background-color","red");
					}else {
						$("#equipentAll_table span[name='wsd8']").css("background-color","green");
					}
					$("#humidtypeTmperature_table span[name='wtp7']").text(entity.temperature.toFixed(2));
					$("#humidtypeTmperature_table span[name='stp7']").text(entity.humidity.toFixed(2));
					$("#humidtypeTmperature_table span[name='voltage7']").text(entity.voltage.toFixed(2));
				}
				if(entity.equipmentid==$.websocket.wenshidu5){//6号机柜内温湿度监测

					//$.websocket.wenshidu5all=entity
					entity.success=socketMsg.success
					$.websocket.wenshidu5all=entity
					if(entity.success){
						$("#equipentAll_table span[name='wsd6']").css("background-color","red");
					}else {
						$("#equipentAll_table span[name='wsd6']").css("background-color","green");
					}
					$("#humidtypeTmperature_table span[name='wtp9']").text(entity.temperature.toFixed(2));
					$("#humidtypeTmperature_table span[name='stp9']").text(entity.humidity.toFixed(2));
					$("#humidtypeTmperature_table span[name='voltage9']").text(entity.voltage.toFixed(2));
				}
				if(entity.equipmentid==$.websocket.wenshidu6){//操作间温湿度监测

					//$.websocket.wenshidu6all=entity
					entity.success=socketMsg.success
					$.websocket.wenshidu6all=entity
					if(entity.success){
						$("#equipentAll_table span[name='wsdcz']").css("background-color","red");
					}else {
						$("#equipentAll_table span[name='wsdcz']").css("background-color","green");
					}
					$("#humidtypeTmperature_table span[name='wcztd']").text(entity.temperature.toFixed(2));
					$("#humidtypeTmperature_table span[name='scztd']").text(entity.humidity.toFixed(2));
					$("#humidtypeTmperature_table span[name='voltagetd']").text(entity.voltage.toFixed(2));
				}
				if(entity.equipmentid==$.websocket.wenshidu7){//10号机柜内温湿度监测

					//$.websocket.wenshidu7all=entity
					entity.success=socketMsg.success
					$.websocket.wenshidu7all=entity
					if(entity.success){
						$("#equipentAll_table span[name='wsd10']").css("background-color","red");
					}else {
						$("#equipentAll_table span[name='wsd10']").css("background-color","green");
					}
					$("#humidtypeTmperature_table span[name='wtp1d']").text(entity.temperature.toFixed(2));
					$("#humidtypeTmperature_table span[name='stp1d']").text(entity.humidity.toFixed(2));
					$("#humidtypeTmperature_table span[name='voltage1d']").text(entity.voltage.toFixed(2));
				}
				if(entity.equipmentid==$.websocket.wenshidu8){//2号机柜内温湿度监测

					//$.websocket.wenshidu8all=entity
					entity.success=socketMsg.success
					$.websocket.wenshidu8all=entity
					if(entity.success){
						$("#accessControl_table span[name='wsd2']").css("background-color","red");
					}else {
						$("#accessControl_table span[name='wsd2']").css("background-color","green");
					}

					$("#humidtypeTmperature_table span[name='wtp2d']").text(entity.temperature.toFixed(2));
					$("#humidtypeTmperature_table span[name='stp2d']").text(entity.humidity.toFixed(2));
					$("#humidtypeTmperature_table span[name='voltage2d']").text(entity.voltage.toFixed(2));
				}


				if(entity.equipmentid==$.websocket.kongtiao1){//空调1

					//$.websocket.kongtiao1all=entity
					entity.success=socketMsg.success
					$.websocket.kongtiao1all=entity
					if(entity.success){
						$("#equipentAll_table span[name='kt1']").css("background-color","red");
					}else {
						$("#equipentAll_table span[name='kt1']").css("background-color","green");
					}
					if (entity.highhumidityalarm == 0) {
						$("#airConditioner_table span[name='highhumidityalarm1']").css("background-color","green");
					} else if (entity.highhumidityalarm == 1) {
						$("#airConditioner_table span[name='highhumidityalarm1']").css("background-color","red");
					}

					$("#airConditioner_table span[name='returnairtemperaturepercentage1']").text(entity.returnairtemperaturepercentage);
					$("#airConditioner_table span[name='refrigerationsettingpoint1']").text(entity.refrigerationsettingpoint);
					if (entity.heatingstate == 1) {
						$("#airConditioner_table span[name='heatingstate1']").text("加热");
					} else if (entity.heatingstate == 0) {
						$("#airConditioner_table span[name='heatingstate1']").text("停止");
					}
					if (entity.fehumidificationstate == 1) {
						$("#airConditioner_table span[name='fehumidificationstate1']").text("除湿");
					} else if (entity.fehumidificationstate == 0) {
						$("#airConditioner_table span[name='fehumidificationstate1']").text("停止");
					}
					if (entity.airconditioningrunstate==7) {
						$("#airConditioner_table span[name='airconditioningrunstate1']").text("系统开机");
					} else if (entity.airconditioningrunstate==0) {
						$("#airConditioner_table span[name='airconditioningrunstate1']").text("本地关机");
					} else if (entity.airconditioningrunstate==1) {
						$("#airConditioner_table span[name='airconditioningrunstate1']").text("远程关机");
					} else if (entity.airconditioningrunstate==2) {
						$("#airConditioner_table span[name='airconditioningrunstate1']").text("监控关机");
					} else if (entity.airconditioningrunstate==3) {
						$("#airConditioner_table span[name='airconditioningrunstate1']").text("组网待机");
					} else if (entity.airconditioningrunstate==4) {
						$("#airConditioner_table span[name='airconditioningrunstate1']").text("电源保护");
					}else if (entity.airconditioningrunstate==5) {
						$("#airConditioner_table span[name='airconditioningrunstate1']").text("气流保护");
					}else if (entity.airconditioningrunstate==6) {
						$("#airConditioner_table span[name='airconditioningrunstate1']").text("压机锁定");
					}

					//$("#airConditioner_table span[name='refrigerationstate1']").text(entity.refrigerationstate);
					if (entity.humidificationstate == 1) {
						$("#airConditioner_table span[name='humidificationstate1']").text("加湿");
					} else if (entity.humidificationstate == 0) {
						$("#airConditioner_table span[name='humidificationstate1']").text("停止");
					}
					if (entity.refrigerationstate == 1) {
						$("#airConditioner_table span[name='refrigerationstate1']").text("制冷");
					} else if (entity.refrigerationstate == 0) {
						$("#airConditioner_table span[name='refrigerationstate1']").text("停止");
					}


					if (entity.hightemperaturealarm == 0) {
						$("#airConditioner_table span[name='hightemperaturealarm1']").css("background-color","green");
					} else if (entity.hightemperaturealarm == 1) {
						$("#airConditioner_table span[name='hightemperaturealarm1']").css("background-color","red");
					}
					if (entity.humidifierfailure == 0) {
						$("#airConditioner_table span[name='humidifierfailure1']").css("background-color","green");
					} else if (entity.humidifierfailure == 1) {
						$("#airConditioner_table span[name='humidifierfailure1']").css("background-color","red");
					}
					if (entity.exhaustalarm == 0) {
						$("#airConditioner_table span[name='exhaustalarm1']").css("background-color","green");
					} else if (entity.exhaustalarm == 1) {
						$("#airConditioner_table span[name='exhaustalarm1']").css("background-color","red");
					}
					if (entity.highvoltagealarm == 0) {
						$("#airConditioner_table span[name='highvoltagealarm1']").css("background-color","green");
					} else if (entity.highvoltagealarm == 1) {
						$("#airConditioner_table span[name='highvoltagealarm1']").css("background-color","red");

					}
					if (entity.internalfanfault == 0) {
						$("#airConditioner_table span[name='internalfanfault1']").css("background-color","green");
					} else if (entity.internalfanfault == 1) {
						$("#airConditioner_table span[name='internalfanfault1']").css("background-color","red");
					}
					if (entity.returnairtemperaturefault == 0) {
						$("#airConditioner_table span[name='returnairtemperaturefault1']").css("background-color","green");
					} else if (entity.returnairtemperaturefault == 1) {
						$("#airConditioner_table span[name='returnairtemperaturefault1']").css("background-color","red");

					}
					if (entity.phasesequenceerror == 0) {
						$("#airConditioner_table span[name='phasesequenceerror1']").css("background-color","green");
					} else if (entity.phasesequenceerror == 1) {
						$("#airConditioner_table span[name='phasesequenceerror1']").css("background-color","red");
					}
					$("#airConditioner_table span[name='returnairtemperaturenumber1']").text(entity.returnairtemperaturenumber);

					$("#airConditioner_table span[name='internalfanruntime1']").text(entity.internalfanruntime);
					$("#airConditioner_table span[name='externalfanruntime1']").text(entity.externalfanruntime);
					$("#airConditioner_table span[name='compressorruntime1']").text(entity.compressorruntime);
					$("#airConditioner_table span[name='electricheatingrruntime1']").text(entity.electricheatingrruntime);
					$("#airConditioner_table span[name='humidifierruntime1']").text(entity.humidifierruntime);
					$("#airConditioner_table span[name='powerfrequency1']").text(entity.powerfrequency);
					$("#airConditioner_table span[name='heatingsetting1']").text(entity.heatingsetting);
					$("#airConditioner_table span[name='hightemperaturealarmnumber1']").text(entity.hightemperaturealarmnumber);
					$("#airConditioner_table span[name='lowetmperaturealarmnumber1']").text(entity.lowetmperaturealarmnumber);
					$("#airConditioner_table span[name='highhumidityalarmnumber1']").text(entity.highhumidityalarmnumber);
					$("#airConditioner_table span[name='lowhumidityalarmnumber1']").text(entity.lowhumidityalarmnumber);
					if(entity.humiditysettingpoint){
						$("#airConditioner_table span[name='humiditysettingpoint1']").text(parseFloat(entity.humiditysettingpoint)*10);
					}


					//$("#airConditioner_table span[name='lowtemperaturealarm1']").text(entity.lowtemperaturealarm);
					if (entity.lowtemperaturealarm == 0) {
						$("#airConditioner_table span[name='lowtemperaturealarm1']").css("background-color","green");
					} else if (entity.lowtemperaturealarm == 1) {
						$("#airConditioner_table span[name='lowtemperaturealarm1']").css("background-color","red");
					}
					if (entity.lowhumidityalarm == 0) {
						$("#airConditioner_table span[name='lowhumidityalarm1']").css("background-color","green");
					} else if (entity.lowhumidityalarm == 1) {
						$("#airConditioner_table span[name='lowhumidityalarm1']").css("background-color","red");
					}
					if (entity.lowhvoltagelock == 0) {
						$("#airConditioner_table span[name='lowhvoltagelock1']").css("background-color","green");
					} else if (entity.lowhvoltagelock == 1) {
						$("#airConditioner_table span[name='lowhvoltagelock1']").css("background-color","red");
					}

					if (entity.airsupplytemperaturefailure == 0) {
						$("#airConditioner_table span[name='airsupplytemperaturefailure1']").css("background-color","green");
					} else if (entity.airsupplytemperaturefailure == 1) {
						$("#airConditioner_table span[name='airsupplytemperaturefailure1']").css("background-color","red");
					}
					if (entity.highvoltagelock == 0) {
						$("#airConditioner_table span[name='highvoltagelock1']").css("background-color","green");
					} else if (entity.highvoltagelock == 1) {
						$("#airConditioner_table span[name='highvoltagelock1']").css("background-color","red");
					}
					if (entity.lightningprotectionalarm == 0) {
						$("#airConditioner_table span[name='lightningprotectionalarm1']").css("background-color","green");
					} else if (entity.lightningprotectionalarm == 1) {
						$("#airConditioner_table span[name='lightningprotectionalarm1']").css("background-color","red");
					}
					if (entity.exhaustlock == 0) {
						$("#airConditioner_table span[name='exhaustlock1']").css("background-color","green");
					} else if (entity.exhaustlock == 1) {
						$("#airConditioner_table span[name='exhaustlock1']").css("background-color","red");
					}
					//$("#airConditioner_table span[name='exhaustlock1']").text(entity.exhaustlock1);

					if (entity.humidifyingovercurrent == 0) {
						$("#airConditioner_table span[name='humidifyingovercurrent1']").css("background-color","green");
					} else if (entity.humidifyingovercurrent == 1) {
						$("#airConditioner_table span[name='humidifyingovercurrent1']").css("background-color","red");
					}
					if (entity.flooroverflow == 0) {
						$("#airConditioner_table span[name='flooroverflow1']").css("background-color","green");
					} else if (entity.flooroverflow == 1) {
						$("#airConditioner_table span[name='flooroverflow1']").css("background-color","red");
					}

					if (entity.heaterfailure == 0) {
						$("#airConditioner_table span[name='heaterfailure1']").css("background-color","green");
					} else if (entity.heaterfailure == 1) {
						$("#airConditioner_table span[name='heaterfailure1']").css("background-color","red");
					}
					if (entity.returnrheumatismfault == 0) {
						$("#airConditioner_table span[name='returnrheumatismfault1']").css("background-color","green");
					} else if (entity.returnrheumatismfault == 1) {
						$("#airConditioner_table span[name='returnrheumatismfault1']").css("background-color","red");
					}
					if (entity.smokealarm == 0) {
						$("#airConditioner_table span[name='smokealarm1']").css("background-color","green");
					} else if (entity.smokealarm == 1) {
						$("#airConditioner_table span[name='smokealarm1']").css("background-color","red");
					}
					if (entity.condensationpressurefault == 0) {
						$("#airConditioner_table span[name='condensationpressurefault1']").css("background-color","green");
					} else if (entity.condensationpressurefault == 1) {
						$("#airConditioner_table span[name='condensationpressurefault1']").css("background-color","red");
					}//$("#airConditioner_table span[name='']").text(entity.lowhvoltagealarm);
					if (entity.lowhvoltagealarm == 0) {
						$("#airConditioner_table span[name='lowhvoltagealarm1']").css("background-color","green");
					} else if (entity.lowhvoltagealarm == 1) {
						$("#airConditioner_table span[name='lowhvoltagealarm1']").css("background-color","red");
					}
					if (entity.missingphasealarm == 0) {
						$("#airConditioner_table span[name='missingphasealarm1']").css("background-color","green");
					} else if (entity.xx == 1) {
						$("#airConditioner_table span[name='missingphasealarm1']").css("background-color","red");
					}
					if (entity.airflowloss == 0) {
						$("#airConditioner_table span[name='airflowloss1']").css("background-color","green");
					} else if (entity.airflowloss == 1) {
						$("#airConditioner_table span[name='airflowloss1']").css("background-color","red");
					}
					if (entity.powerlossalarm == 0) {
						$("#airConditioner_table span[name='powerlossalarm1']").css("background-color","green");
					} else if (entity.powerlossalarm == 1) {
						$("#airConditioner_table span[name='powerlossalarm1']").css("background-color","red");
					}

					if (entity.remoteshutdownalarm == 0) {
						$("#airConditioner_table span[name='remoteshutdownalarm1']").css("background-color","green");
					} else if (entity.remoteshutdownalarm == 1) {
						$("#airConditioner_table span[name='remoteshutdownalarm1']").css("background-color","red");
					}
					if (entity.networkfailurealarm == 0) {
						$("#airConditioner_table span[name='networkfailurealarm1']").css("background-color","green");
					} else if (entity.networkfailurealarm == 1) {
						$("#airConditioner_table span[name='networkfailurealarm1']").css("background-color","red");
					}
					if(entity.airconditioningrunstate){
						this.kt1=entity.airconditioningrunstate
					}
					if(this.kt1==0||this.kt1==1||this.kt1==2){
						$("#airConditioner_table span[name='heatingstate1']").text("-");
						$("#airConditioner_table span[name='fehumidificationstate1']").text("-");
						$("#airConditioner_table span[name='humidificationstate1']").text("-");
						$("#airConditioner_table span[name='refrigerationstate1']").text("-");
						$("#airConditioner_table span[name='returnairtemperaturenumber1']").text("-");
						$("#airConditioner_table span[name='internalfanruntime1']").text("-");
						$("#airConditioner_table span[name='externalfanruntime1']").text("-");
						$("#airConditioner_table span[name='compressorruntime1']").text("-");
						$("#airConditioner_table span[name='electricheatingrruntime1']").text("-");
						$("#airConditioner_table span[name='humidifierruntime1']").text("-");
						$("#airConditioner_table span[name='powerfrequency1']").text("-");
						$("#airConditioner_table span[name='heatingsetting1']").text("-");
						$("#airConditioner_table span[name='hightemperaturealarmnumber1']").text("-");
						$("#airConditioner_table span[name='lowetmperaturealarmnumber1']").text("-");
						$("#airConditioner_table span[name='highhumidityalarmnumber1']").text("-");
						$("#airConditioner_table span[name='lowhumidityalarmnumber1']").text("-");
						$("#airConditioner_table span[name='returnairtemperaturepercentage1']").text("-");
						$("#airConditioner_table span[name='refrigerationsettingpoint1']").text("-");
						$("#airConditioner_table span[name='humiditysettingpoint1']").text("-");
						$("#airConditioner_table span[name='hightemperaturealarm1']").text("-");
						$("#airConditioner_table span[name='humidifierfailure1']").text("-");
						$("#airConditioner_table span[name='exhaustalarm1']").text("-");
						$("#airConditioner_table span[name='highvoltagealarm1']").text("-");
						$("#airConditioner_table span[name='internalfanfault1']").text("-");
						$("#airConditioner_table span[name='returnairtemperaturefault1']").text("-");
						$("#airConditioner_table span[name='phasesequenceerror1']").text("-");
						$("#airConditioner_table span[name='lowtemperaturealarm1']").text("-");
						$("#airConditioner_table span[name='lowhumidityalarm1']").text("-");
						$("#airConditioner_table span[name='lowhvoltagelock1']").text("-");
						$("#airConditioner_table span[name='airsupplytemperaturefailure1']").text("-");
						$("#airConditioner_table span[name='highvoltagelock1']").text("-");
						$("#airConditioner_table span[name='lightningprotectionalarm1']").text("-");
						$("#airConditioner_table span[name='exhaustlock1']").text("-");
						$("#airConditioner_table span[name='humidifyingovercurrent1']").text("-");
						$("#airConditioner_table span[name='flooroverflow1']").text("-");
						$("#airConditioner_table span[name='heaterfailure1']").text("-");
						$("#airConditioner_table span[name='returnrheumatismfault1']").text("-");
						$("#airConditioner_table span[name='smokealarm1']").text("-");
						$("#airConditioner_table span[name='condensationpressurefault1']").text("-");
						$("#airConditioner_table span[name='lowhvoltagealarm1']").text("-");
						$("#airConditioner_table span[name='missingphasealarm1']").text("-");
						$("#airConditioner_table span[name='airflowloss1']").text("-");
						$("#airConditioner_table span[name='powerlossalarm1']").text("-");
						$("#airConditioner_table span[name='remoteshutdownalarm1']").text("-");
						$("#airConditioner_table span[name='networkfailurealarm1']").text("-");
						$("#airConditioner_table span[name='highhumidityalarm1']").text("-");
						$("#airConditioner_table span[name='hightemperaturealarm1']").css("background-color","transparent");
						$("#airConditioner_table span[name='humidifierfailure1']").css("background-color","transparent");
						$("#airConditioner_table span[name='exhaustalarm1']").css("background-color","transparent");
						$("#airConditioner_table span[name='highvoltagealarm1']").css("background-color","transparent");
						$("#airConditioner_table span[name='internalfanfault1']").css("background-color","transparent");
						$("#airConditioner_table span[name='returnairtemperaturefault1']").css("background-color","transparent");
						$("#airConditioner_table span[name='phasesequenceerror1']").css("background-color","transparent");
						$("#airConditioner_table span[name='lowtemperaturealarm1']").css("background-color","transparent");
						$("#airConditioner_table span[name='lowhumidityalarm1']").css("background-color","transparent");
						$("#airConditioner_table span[name='lowhvoltagelock1']").css("background-color","transparent");
						$("#airConditioner_table span[name='airsupplytemperaturefailure1']").css("background-color","transparent");
						$("#airConditioner_table span[name='highvoltagelock1']").css("background-color","transparent");
						$("#airConditioner_table span[name='lightningprotectionalarm1']").css("background-color","transparent");
						$("#airConditioner_table span[name='exhaustlock1']").css("background-color","transparent");
						$("#airConditioner_table span[name='humidifyingovercurrent1']").css("background-color","transparent");
						$("#airConditioner_table span[name='flooroverflow1']").css("background-color","transparent");
						$("#airConditioner_table span[name='heaterfailure1']").css("background-color","transparent");
						$("#airConditioner_table span[name='returnrheumatismfault1']").css("background-color","transparent");
						$("#airConditioner_table span[name='smokealarm1']").css("background-color","transparent");
						$("#airConditioner_table span[name='condensationpressurefault1']").css("background-color","transparent");
						$("#airConditioner_table span[name='lowhvoltagealarm1']").css("background-color","transparent");
						$("#airConditioner_table span[name='missingphasealarm1']").css("background-color","transparent");
						$("#airConditioner_table span[name='airflowloss1']").css("background-color","transparent");
						$("#airConditioner_table span[name='powerlossalarm1']").css("background-color","transparent");
						$("#airConditioner_table span[name='remoteshutdownalarm1']").css("background-color","transparent");
						$("#airConditioner_table span[name='networkfailurealarm1']").css("background-color","transparent");
						$("#airConditioner_table span[name='highhumidityalarm1']").css("background-color","transparent");
						$("#airConditioner_table span[name='hightemperaturealarm1']").css("color","transparent");
						$("#airConditioner_table span[name='humidifierfailure1']").css("color","#fff !important");
						$("#airConditioner_table span[name='exhaustalarm1']").css("color","#fff !important");
						$("#airConditioner_table span[name='highvoltagealarm1']").css("color","#fff !important");
						$("#airConditioner_table span[name='internalfanfault1']").css("color","#fff !important");
						$("#airConditioner_table span[name='returnairtemperaturefault1']").css("color","#fff !important");
						$("#airConditioner_table span[name='phasesequenceerror1']").css("color","#fff !important");
						$("#airConditioner_table span[name='lowtemperaturealarm1']").css("color","#fff !important");
						$("#airConditioner_table span[name='lowhumidityalarm1']").css("color","#fff !important");
						$("#airConditioner_table span[name='lowhvoltagelock1']").css("color","#fff !important");
						$("#airConditioner_table span[name='airsupplytemperaturefailure1']").css("color","#fff !important");
						$("#airConditioner_table span[name='highvoltagelock1']").css("color","#fff !important");
						$("#airConditioner_table span[name='lightningprotectionalarm1']").css("color","#fff !important");
						$("#airConditioner_table span[name='exhaustlock1']").css("color","#fff !important");
						$("#airConditioner_table span[name='humidifyingovercurrent1']").css("color","#fff !important");
						$("#airConditioner_table span[name='flooroverflow1']").css("color","#fff !important");
						$("#airConditioner_table span[name='heaterfailure1']").css("color","#fff !important");
						$("#airConditioner_table span[name='returnrheumatismfault1']").css("color","#fff !important");
						$("#airConditioner_table span[name='smokealarm1']").css("color","#fff !important");
						$("#airConditioner_table span[name='condensationpressurefault1']").css("color","#fff !important");
						$("#airConditioner_table span[name='lowhvoltagealarm1']").css("color","#fff !important");
						$("#airConditioner_table span[name='missingphasealarm1']").css("color","#fff !important");
						$("#airConditioner_table span[name='airflowloss1']").css("color","#fff !important");
						$("#airConditioner_table span[name='powerlossalarm1']").css("color","#fff !important");
						$("#airConditioner_table span[name='remoteshutdownalarm1']").css("color","#fff !important");
						$("#airConditioner_table span[name='networkfailurealarm1']").css("color","#fff !important");
						$("#airConditioner_table span[name='highhumidityalarm1']").css("color","#fff !important");
					}else {
						$("#airConditioner_table span[name='hightemperaturealarm1']").css("color","transparent");
						$("#airConditioner_table span[name='humidifierfailure1']").css("color","green !important");
						$("#airConditioner_table span[name='exhaustalarm1']").css("color","green !important");
						$("#airConditioner_table span[name='highvoltagealarm1']").css("color","green !important");
						$("#airConditioner_table span[name='internalfanfault1']").css("color","green !important");
						$("#airConditioner_table span[name='returnairtemperaturefault1']").css("color","green !important");
						$("#airConditioner_table span[name='phasesequenceerror1']").css("color","green !important");
						$("#airConditioner_table span[name='lowtemperaturealarm1']").css("color","green !important");
						$("#airConditioner_table span[name='lowhumidityalarm1']").css("color","green !important");
						$("#airConditioner_table span[name='lowhvoltagelock1']").css("color","green !important");
						$("#airConditioner_table span[name='airsupplytemperaturefailure1']").css("color","green !important");
						$("#airConditioner_table span[name='highvoltagelock1']").css("color","green !important");
						$("#airConditioner_table span[name='lightningprotectionalarm1']").css("color","green !important");
						$("#airConditioner_table span[name='exhaustlock1']").css("color","green !important");
						$("#airConditioner_table span[name='humidifyingovercurrent1']").css("color","green !important");
						$("#airConditioner_table span[name='flooroverflow1']").css("color","green !important");
						$("#airConditioner_table span[name='heaterfailure1']").css("color","green !important");
						$("#airConditioner_table span[name='returnrheumatismfault1']").css("color","green !important");
						$("#airConditioner_table span[name='smokealarm1']").css("color","green !important");
						$("#airConditioner_table span[name='condensationpressurefault1']").css("color","green !important");
						$("#airConditioner_table span[name='lowhvoltagealarm1']").css("color","green !important");
						$("#airConditioner_table span[name='missingphasealarm1']").css("color","green !important");
						$("#airConditioner_table span[name='airflowloss1']").css("color","green !important");
						$("#airConditioner_table span[name='powerlossalarm1']").css("color","green !important");
						$("#airConditioner_table span[name='remoteshutdownalarm1']").css("color","green !important");
						$("#airConditioner_table span[name='networkfailurealarm1']").css("color","green !important");
						$("#airConditioner_table span[name='highhumidityalarm1']").css("color","green !important");
					}
				}

				if(entity.equipmentid==$.websocket.kongtiao2){//空调2

					//$.websocket.kongtiao2all=entity
					entity.success=socketMsg.success
					$.websocket.kongtiao2all=entity
					if(entity.success){
						$("#equipentAll_table span[name='kt2']").css("background-color","red");
					}else {
						$("#equipentAll_table span[name='kt2']").css("background-color","green");
					}
					if (entity.highhumidityalarm == 0) {
						$("#airConditioner_table span[name='highhumidityalarm2']").css("background-color","green");
					} else if (entity.highhumidityalarm == 1) {
						$("#airConditioner_table span[name='highhumidityalarm2']").css("background-color","red");
					}
					$("#airConditioner_table span[name='returnairtemperaturepercentage2']").text(entity.returnairtemperaturepercentage);

					if (entity.heatingstate == 1) {
						$("#airConditioner_table span[name='heatingstate2']").text("加热");
					} else if (entity.heatingstate == 0) {
						$("#airConditioner_table span[name='heatingstate2']").text("停止");
					}
					if (entity.fehumidificationstate == 1) {
						$("#airConditioner_table span[name='fehumidificationstate2']").text("除湿");
					} else if (entity.fehumidificationstate ==0) {
						$("#airConditioner_table span[name='fehumidificationstate2']").text("停止");
					}

					if (entity.airconditioningrunstate==7) {
						$("#airConditioner_table span[name='airconditioningrunstate2']").text("系统开机");
					} else if (entity.airconditioningrunstate==0) {
						$("#airConditioner_table span[name='airconditioningrunstate2']").text("本地关机");
					} else if (entity.airconditioningrunstate==1) {
						$("#airConditioner_table span[name='airconditioningrunstate2']").text("远程关机");
					} else if (entity.airconditioningrunstate==2) {
						$("#airConditioner_table span[name='airconditioningrunstate2']").text("监控关机");
					} else if (entity.airconditioningrunstate==3) {
						$("#airConditioner_table span[name='airconditioningrunstate2']").text("组网待机");
					} else if (entity.airconditioningrunstate==4) {
						$("#airConditioner_table span[name='airconditioningrunstate2']").text("电源保护");
					}else if (entity.airconditioningrunstate==5) {
						$("#airConditioner_table span[name='airconditioningrunstate2']").text("气流保护");
					}else if (entity.airconditioningrunstate==6) {
						$("#airConditioner_table span[name='airconditioningrunstate2']").text("压机锁定");
					}
					//$("#airConditioner_table span[name='refrigerationstate2']").text(entity.refrigerationstate);
					if (entity.humidificationstate == 1) {
						$("#airConditioner_table span[name='humidificationstate2']").text("加湿");
					} else if (entity.humidificationstate == 0) {
						$("#airConditioner_table span[name='humidificationstate2']").text("停止");
					}
					if (entity.refrigerationstate == 1) {
						$("#airConditioner_table span[name='refrigerationstate2']").text("制冷");
					} else if (entity.refrigerationstate == 0) {
						$("#airConditioner_table span[name='refrigerationstate2']").text("停止");
					}
					$("#airConditioner_table span[name='refrigerationsettingpoint2']").text(entity.refrigerationsettingpoint);

					if (entity.hightemperaturealarm == 0) {
						$("#airConditioner_table span[name='hightemperaturealarm2']").css("background-color","green");
					} else if (entity.hightemperaturealarm == 1) {
						$("#airConditioner_table span[name='hightemperaturealarm2']").css("background-color","red");
					}
					if (entity.humidifierfailure == 0) {
						$("#airConditioner_table span[name='humidifierfailure2']").css("background-color","green");
					} else if (entity.humidifierfailure == 1) {
						$("#airConditioner_table span[name='humidifierfailure2']").css("background-color","red");
					}
					if (entity.exhaustalarm == 0) {
						$("#airConditioner_table span[name='exhaustalarm2']").css("background-color","green");
					} else if (entity.exhaustalarm == 1) {
						$("#airConditioner_table span[name='exhaustalarm2']").css("background-color","red");
					}
					if (entity.highvoltagealarm == 0) {
						$("#airConditioner_table span[name='highvoltagealarm2']").css("background-color","green");
					} else if (entity.highvoltagealarm == 1) {
						$("#airConditioner_table span[name='highvoltagealarm2']").css("background-color","red");

					}
					if (entity.internalfanfault == 0) {
						$("#airConditioner_table span[name='internalfanfault2']").css("background-color","green");
					} else if (entity.internalfanfault == 1) {
						$("#airConditioner_table span[name='internalfanfault2']").css("background-color","red");
					}
					if (entity.returnairtemperaturefault == 0) {
						$("#airConditioner_table span[name='returnairtemperaturefault2']").css("background-color","green");
					} else if (entity.returnairtemperaturefault == 1) {
						$("#airConditioner_table span[name='returnairtemperaturefault2']").css("background-color","red");

					}
					if (entity.phasesequenceerror == 0) {
						$("#airConditioner_table span[name='phasesequenceerror2']").css("background-color","green");
					} else if (entity.phasesequenceerror == 1) {
						$("#airConditioner_table span[name='phasesequenceerror2']").css("background-color","red");
					}
					$("#airConditioner_table span[name='returnairtemperaturenumber2']").text(entity.returnairtemperaturenumber);

					$("#airConditioner_table span[name='internalfanruntime2']").text(entity.internalfanruntime);
					$("#airConditioner_table span[name='externalfanruntime2']").text(entity.externalfanruntime);
					$("#airConditioner_table span[name='compressorruntime2']").text(entity.compressorruntime);
					$("#airConditioner_table span[name='electricheatingrruntime2']").text(entity.electricheatingrruntime);
					$("#airConditioner_table span[name='humidifierruntime2']").text(entity.humidifierruntime);
					$("#airConditioner_table span[name='powerfrequency2']").text(entity.powerfrequency);
					$("#airConditioner_table span[name='heatingsetting2']").text(entity.heatingsetting);
					$("#airConditioner_table span[name='hightemperaturealarmnumber2']").text(entity.hightemperaturealarmnumber);
					$("#airConditioner_table span[name='lowetmperaturealarmnumber2']").text(entity.lowetmperaturealarmnumber);
					$("#airConditioner_table span[name='highhumidityalarmnumber2']").text(entity.highhumidityalarmnumber);
					$("#airConditioner_table span[name='lowhumidityalarmnumber2']").text(entity.lowhumidityalarmnumber);
					if(entity.humiditysettingpoint){
						$("#airConditioner_table span[name='humiditysettingpoint2']").text(parseFloat(entity.humiditysettingpoint)*10);
					}


					//$("#airConditioner_table span[name='lowtemperaturealarm2']").text(entity.lowtemperaturealarm);
					if (entity.lowtemperaturealarm == 0) {
						$("#airConditioner_table span[name='lowtemperaturealarm2']").css("background-color","green");
					} else if (entity.lowtemperaturealarm == 1) {
						$("#airConditioner_table span[name='lowtemperaturealarm2']").css("background-color","red");
					}
					if (entity.lowhumidityalarm == 0) {
						$("#airConditioner_table span[name='lowhumidityalarm2']").css("background-color","green");
					} else if (entity.lowhumidityalarm == 1) {
						$("#airConditioner_table span[name='lowhumidityalarm2']").css("background-color","red");
					}
					if (entity.lowhvoltagelock == 0) {
						$("#airConditioner_table span[name='lowhvoltagelock2']").css("background-color","green");
					} else if (entity.lowhvoltagelock == 1) {
						$("#airConditioner_table span[name='lowhvoltagelock2']").css("background-color","red");
					}

					if (entity.airsupplytemperaturefailure == 0) {
						$("#airConditioner_table span[name='airsupplytemperaturefailure2']").css("background-color","green");
					} else if (entity.airsupplytemperaturefailure == 1) {
						$("#airConditioner_table span[name='airsupplytemperaturefailure2']").css("background-color","red");
					}
					if (entity.highvoltagelock == 0) {
						$("#airConditioner_table span[name='highvoltagelock2']").css("background-color","green");
					} else if (entity.highvoltagelock == 1) {
						$("#airConditioner_table span[name='highvoltagelock2']").css("background-color","red");
					}
					if (entity.lightningprotectionalarm == 0) {
						$("#airConditioner_table span[name='lightningprotectionalarm2']").css("background-color","green");
					} else if (entity.lightningprotectionalarm == 1) {
						$("#airConditioner_table span[name='lightningprotectionalarm2']").css("background-color","red");
					}
					if (entity.exhaustlock == 0) {
						$("#airConditioner_table span[name='exhaustlock2']").css("background-color","green");
					} else if (entity.exhaustlock == 1) {
						$("#airConditioner_table span[name='exhaustlock2']").css("background-color","red");
					}
					//$("#airConditioner_table span[name='exhaustlock2']").text(entity.exhaustlock1);

					if (entity.humidifyingovercurrent == 0) {
						$("#airConditioner_table span[name='humidifyingovercurrent2']").css("background-color","green");
					} else if (entity.humidifyingovercurrent == 1) {
						$("#airConditioner_table span[name='humidifyingovercurrent2']").css("background-color","red");
					}
					if (entity.flooroverflow == 0) {
						$("#airConditioner_table span[name='flooroverflow2']").css("background-color","green");
					} else if (entity.flooroverflow == 1) {
						$("#airConditioner_table span[name='flooroverflow2']").css("background-color","red");
					}

					if (entity.heaterfailure == 0) {
						$("#airConditioner_table span[name='heaterfailure2']").css("background-color","green");
					} else if (entity.heaterfailure == 1) {
						$("#airConditioner_table span[name='heaterfailure2']").css("background-color","red");
					}
					if (entity.returnrheumatismfault == 0) {
						$("#airConditioner_table span[name='returnrheumatismfault2']").css("background-color","green");
					} else if (entity.returnrheumatismfault == 1) {
						$("#airConditioner_table span[name='returnrheumatismfault2']").css("background-color","red");
					}
					if (entity.smokealarm == 0) {
						$("#airConditioner_table span[name='smokealarm2']").css("background-color","green");
					} else if (entity.smokealarm == 1) {
						$("#airConditioner_table span[name='smokealarm2']").css("background-color","red");
					}
					if (entity.condensationpressurefault == 0) {
						$("#airConditioner_table span[name='condensationpressurefault2']").css("background-color","green");
					} else if (entity.condensationpressurefault == 1) {
						$("#airConditioner_table span[name='condensationpressurefault2']").css("background-color","red");
					}//$("#airConditioner_table span[name='']").text(entity.lowhvoltagealarm);
					if (entity.lowhvoltagealarm == 0) {
						$("#airConditioner_table span[name='lowhvoltagealarm2']").css("background-color","green");
					} else if (entity.lowhvoltagealarm == 1) {
						$("#airConditioner_table span[name='lowhvoltagealarm2']").css("background-color","red");
					}
					if (entity.missingphasealarm == 0) {
						$("#airConditioner_table span[name='missingphasealarm2']").css("background-color","green");
					} else if (entity.xx == 1) {
						$("#airConditioner_table span[name='missingphasealarm2']").css("background-color","red");
					}
					if (entity.airflowloss == 0) {
						$("#airConditioner_table span[name='airflowloss2']").css("background-color","green");
					} else if (entity.airflowloss == 1) {
						$("#airConditioner_table span[name='airflowloss2']").css("background-color","red");
					}
					if (entity.powerlossalarm == 0) {
						$("#airConditioner_table span[name='powerlossalarm2']").css("background-color","green");
					} else if (entity.powerlossalarm == 1) {
						$("#airConditioner_table span[name='powerlossalarm2']").css("background-color","red");
					}

					if (entity.remoteshutdownalarm == 0) {
						$("#airConditioner_table span[name='remoteshutdownalarm2']").css("background-color","green");
					} else if (entity.remoteshutdownalarm == 1) {
						$("#airConditioner_table span[name='remoteshutdownalarm2']").css("background-color","red");
					}
					if (entity.networkfailurealarm == 0) {
						$("#airConditioner_table span[name='networkfailurealarm2']").css("background-color","green");
					} else if (entity.networkfailurealarm == 1) {
						$("#airConditioner_table span[name='networkfailurealarm2']").css("background-color","red");
					}
					if(entity.airconditioningrunstate){
						this.kt2=entity.airconditioningrunstate
					}
					if(this.kt2==0||this.kt2==1||this.kt2==2){
						$("#airConditioner_table span[name='heatingstate2']").text("-");
						$("#airConditioner_table span[name='fehumidificationstate2']").text("-");
						$("#airConditioner_table span[name='humidificationstate2']").text("-");
						$("#airConditioner_table span[name='refrigerationstate2']").text("-");
						$("#airConditioner_table span[name='returnairtemperaturenumber2']").text("-");
						$("#airConditioner_table span[name='internalfanruntime2']").text("-");
						$("#airConditioner_table span[name='externalfanruntime2']").text("-");
						$("#airConditioner_table span[name='compressorruntime2']").text("-");
						$("#airConditioner_table span[name='electricheatingrruntime2']").text("-");
						$("#airConditioner_table span[name='humidifierruntime2']").text("-");
						$("#airConditioner_table span[name='powerfrequency2']").text("-");
						$("#airConditioner_table span[name='heatingsetting2']").text("-");
						$("#airConditioner_table span[name='hightemperaturealarmnumber2']").text("-");
						$("#airConditioner_table span[name='lowetmperaturealarmnumber2']").text("-");
						$("#airConditioner_table span[name='highhumidityalarmnumber2']").text("-");
						$("#airConditioner_table span[name='lowhumidityalarmnumber2']").text("-");
						$("#airConditioner_table span[name='returnairtemperaturepercentage2']").text("-");
						$("#airConditioner_table span[name='refrigerationsettingpoint2']").text("-");
						$("#airConditioner_table span[name='humiditysettingpoint2']").text("-");


						$("#airConditioner_table span[name='hightemperaturealarm2']").text("-");
						$("#airConditioner_table span[name='humidifierfailure2']").text("-");
						$("#airConditioner_table span[name='exhaustalarm2']").text("-");
						$("#airConditioner_table span[name='highvoltagealarm2']").text("-");
						$("#airConditioner_table span[name='internalfanfault2']").text("-");
						$("#airConditioner_table span[name='returnairtemperaturefault2']").text("-");
						$("#airConditioner_table span[name='phasesequenceerror2']").text("-");
						$("#airConditioner_table span[name='lowtemperaturealarm2']").text("-");
						$("#airConditioner_table span[name='lowhumidityalarm2']").text("-");
						$("#airConditioner_table span[name='lowhvoltagelock2']").text("-");
						$("#airConditioner_table span[name='airsupplytemperaturefailure2']").text("-");
						$("#airConditioner_table span[name='highvoltagelock2']").text("-");
						$("#airConditioner_table span[name='lightningprotectionalarm2']").text("-");
						$("#airConditioner_table span[name='exhaustlock2']").text("-");
						$("#airConditioner_table span[name='humidifyingovercurrent2']").text("-");
						$("#airConditioner_table span[name='flooroverflow2']").text("-");
						$("#airConditioner_table span[name='heaterfailure2']").text("-");
						$("#airConditioner_table span[name='returnrheumatismfault2']").text("-");
						$("#airConditioner_table span[name='smokealarm2']").text("-");
						$("#airConditioner_table span[name='condensationpressurefault2']").text("-");
						$("#airConditioner_table span[name='lowhvoltagealarm2']").text("-");
						$("#airConditioner_table span[name='missingphasealarm2']").text("-");
						$("#airConditioner_table span[name='airflowloss2']").text("-");
						$("#airConditioner_table span[name='powerlossalarm2']").text("-");
						$("#airConditioner_table span[name='remoteshutdownalarm2']").text("-");
						$("#airConditioner_table span[name='networkfailurealarm2']").text("-");
						$("#airConditioner_table span[name='highhumidityalarm2']").text("-");
						$("#airConditioner_table span[name='hightemperaturealarm2']").css("background-color","transparent");
						$("#airConditioner_table span[name='humidifierfailure2']").css("background-color","transparent");
						$("#airConditioner_table span[name='exhaustalarm2']").css("background-color","transparent");
						$("#airConditioner_table span[name='highvoltagealarm2']").css("background-color","transparent");
						$("#airConditioner_table span[name='internalfanfault2']").css("background-color","transparent");
						$("#airConditioner_table span[name='returnairtemperaturefault2']").css("background-color","transparent");
						$("#airConditioner_table span[name='phasesequenceerror2']").css("background-color","transparent");
						$("#airConditioner_table span[name='lowtemperaturealarm2']").css("background-color","transparent");
						$("#airConditioner_table span[name='lowhumidityalarm2']").css("background-color","transparent");
						$("#airConditioner_table span[name='lowhvoltagelock2']").css("background-color","transparent");
						$("#airConditioner_table span[name='airsupplytemperaturefailure2']").css("background-color","transparent");
						$("#airConditioner_table span[name='highvoltagelock2']").css("background-color","transparent");
						$("#airConditioner_table span[name='lightningprotectionalarm2']").css("background-color","transparent");
						$("#airConditioner_table span[name='exhaustlock2']").css("background-color","transparent");
						$("#airConditioner_table span[name='humidifyingovercurrent2']").css("background-color","transparent");
						$("#airConditioner_table span[name='flooroverflow2']").css("background-color","transparent");
						$("#airConditioner_table span[name='heaterfailure2']").css("background-color","transparent");
						$("#airConditioner_table span[name='returnrheumatismfault2']").css("background-color","transparent");
						$("#airConditioner_table span[name='smokealarm2']").css("background-color","transparent");
						$("#airConditioner_table span[name='condensationpressurefault2']").css("background-color","transparent");
						$("#airConditioner_table span[name='lowhvoltagealarm2']").css("background-color","transparent");
						$("#airConditioner_table span[name='missingphasealarm2']").css("background-color","transparent");
						$("#airConditioner_table span[name='airflowloss2']").css("background-color","transparent");
						$("#airConditioner_table span[name='powerlossalarm2']").css("background-color","transparent");
						$("#airConditioner_table span[name='remoteshutdownalarm2']").css("background-color","transparent");
						$("#airConditioner_table span[name='networkfailurealarm2']").css("background-color","transparent");
						$("#airConditioner_table span[name='highhumidityalarm2']").css("background-color","transparent");
						$("#airConditioner_table span[name='hightemperaturealarm2']").css("color","transparent");
						$("#airConditioner_table span[name='humidifierfailure2']").css("color","#fff !important");
						$("#airConditioner_table span[name='exhaustalarm2']").css("color","#fff !important");
						$("#airConditioner_table span[name='highvoltagealarm2']").css("color","#fff !important");
						$("#airConditioner_table span[name='internalfanfault2']").css("color","#fff !important");
						$("#airConditioner_table span[name='returnairtemperaturefault2']").css("color","#fff !important");
						$("#airConditioner_table span[name='phasesequenceerror2']").css("color","#fff !important");
						$("#airConditioner_table span[name='lowtemperaturealarm2']").css("color","#fff !important");
						$("#airConditioner_table span[name='lowhumidityalarm2']").css("color","#fff !important");
						$("#airConditioner_table span[name='lowhvoltagelock2']").css("color","#fff !important");
						$("#airConditioner_table span[name='airsupplytemperaturefailure2']").css("color","#fff !important");
						$("#airConditioner_table span[name='highvoltagelock2']").css("color","#fff !important");
						$("#airConditioner_table span[name='lightningprotectionalarm2']").css("color","#fff !important");
						$("#airConditioner_table span[name='exhaustlock2']").css("color","#fff !important");
						$("#airConditioner_table span[name='humidifyingovercurrent2']").css("color","#fff !important");
						$("#airConditioner_table span[name='flooroverflow2']").css("color","#fff !important");
						$("#airConditioner_table span[name='heaterfailure2']").css("color","#fff !important");
						$("#airConditioner_table span[name='returnrheumatismfault2']").css("color","#fff !important");
						$("#airConditioner_table span[name='smokealarm2']").css("color","#fff !important");
						$("#airConditioner_table span[name='condensationpressurefault2']").css("color","#fff !important");
						$("#airConditioner_table span[name='lowhvoltagealarm2']").css("color","#fff !important");
						$("#airConditioner_table span[name='missingphasealarm2']").css("color","#fff !important");
						$("#airConditioner_table span[name='airflowloss2']").css("color","#fff !important");
						$("#airConditioner_table span[name='powerlossalarm2']").css("color","#fff !important");
						$("#airConditioner_table span[name='remoteshutdownalarm2']").css("color","#fff !important");
						$("#airConditioner_table span[name='networkfailurealarm2']").css("color","#fff !important");
						$("#airConditioner_table span[name='highhumidityalarm2']").css("color","#fff !important");
					}else {
						$("#airConditioner_table span[name='hightemperaturealarm2']").css("color","transparent");
						$("#airConditioner_table span[name='humidifierfailure2']").css("color","green !important");
						$("#airConditioner_table span[name='exhaustalarm2']").css("color","green !important");
						$("#airConditioner_table span[name='highvoltagealarm2']").css("color","green !important");
						$("#airConditioner_table span[name='internalfanfault2']").css("color","green !important");
						$("#airConditioner_table span[name='returnairtemperaturefault2']").css("color","green !important");
						$("#airConditioner_table span[name='phasesequenceerror2']").css("color","green !important");
						$("#airConditioner_table span[name='lowtemperaturealarm2']").css("color","green !important");
						$("#airConditioner_table span[name='lowhumidityalarm2']").css("color","green !important");
						$("#airConditioner_table span[name='lowhvoltagelock2']").css("color","green !important");
						$("#airConditioner_table span[name='airsupplytemperaturefailure2']").css("color","green !important");
						$("#airConditioner_table span[name='highvoltagelock2']").css("color","green !important");
						$("#airConditioner_table span[name='lightningprotectionalarm2']").css("color","green !important");
						$("#airConditioner_table span[name='exhaustlock2']").css("color","green !important");
						$("#airConditioner_table span[name='humidifyingovercurrent2']").css("color","green !important");
						$("#airConditioner_table span[name='flooroverflow2']").css("color","green !important");
						$("#airConditioner_table span[name='heaterfailure2']").css("color","green !important");
						$("#airConditioner_table span[name='returnrheumatismfault2']").css("color","green !important");
						$("#airConditioner_table span[name='smokealarm2']").css("color","green !important");
						$("#airConditioner_table span[name='condensationpressurefault2']").css("color","green !important");
						$("#airConditioner_table span[name='lowhvoltagealarm2']").css("color","green !important");
						$("#airConditioner_table span[name='missingphasealarm2']").css("color","green !important");
						$("#airConditioner_table span[name='airflowloss2']").css("color","green !important");
						$("#airConditioner_table span[name='powerlossalarm2']").css("color","green !important");
						$("#airConditioner_table span[name='remoteshutdownalarm2']").css("color","green !important");
						$("#airConditioner_table span[name='networkfailurealarm2']").css("color","green !important");
						$("#airConditioner_table span[name='highhumidityalarm2']").css("color","green !important");
					}

				}

				if(entity.equipmentid==$.websocket.dly){//电量仪

					//$.websocket.dlyall=entity
					entity.success=socketMsg.success
					$.websocket.dlyall=entity
					if(entity.success){
						$("#equipentAll_table span[name='hwgy']").css("background-color","red");
					}else {
						$("#equipentAll_table span[name='hwgy']").css("background-color","green");
					}
					$("#upsPowerInput_table span[name='aVoltage']").text(entity.aVoltage.toFixed(2));
					entity.abVoltage=(parseFloat(entity.aVoltage)+parseFloat(entity.bVoltage))/2*1.732
					entity.bcVoltage=(parseFloat(entity.cVoltage)+parseFloat(entity.bVoltage))/2*1.732
					entity.caVoltage=(parseFloat(entity.aVoltage)+parseFloat(entity.cVoltage))/2*1.732
					$("#upsPowerInput_table span[name='abVoltage']").text(entity.abVoltage.toFixed(2));
					$("#upsPowerInput_table span[name='bcVoltage']").text(entity.bcVoltage.toFixed(2));
					$("#upsPowerInput_table span[name='caVoltage']").text(entity.caVoltage.toFixed(2));


					$("#upsPowerInput_table span[name='bVoltage']").text(entity.bVoltage.toFixed(2));
					$("#upsPowerInput_table span[name='cVoltage']").text(entity.cVoltage.toFixed(2));
					$("#upsPowerInput_table span[name='aCurrent']").text(entity.aCurrent.toFixed(2));
					$("#upsPowerInput_table span[name='bCurrent']").text(entity.bCurrent.toFixed(2));
					$("#upsPowerInput_table span[name='cCurrent']").text(entity.cCurrent.toFixed(2));

					entity.totalAvailablePowerMin=parseFloat(entity.aAvailablePower)+parseFloat(entity.cAvailablePower)+parseFloat(entity.bAvailablePower)
					$("#upsPowerInput_table span[name='totalAvailablePowerMin']").text(entity.totalAvailablePowerMin.toFixed(2));
					entity.totalUselessPowerMin=parseFloat(entity.aUselessPower)+parseFloat(entity.bUselessPower)+parseFloat(entity.cUselessPower)
					$("#upsPowerInput_table span[name='totalUselessPowerMin']").text(entity.totalUselessPowerMin.toFixed(2));
					//entity.totalPowerFactor=parseFloat(aPowerFactor)+parseFloat(bPowerFactor)+parseFloat(cPowerFactor)
					$("#upsPowerInput_table span[name='totalPowerFactor']").text(entity.totalPowerFactor.toFixed(2));

					$("#upsPowerInput_table span[name='totalAvailablePowerMax']").text(entity.totalAvailablePowerMax.toFixed(2));
					$("#upsPowerInput_table span[name='totalUselessPowerMax']").text(entity.totalUselessPowerMax.toFixed(2));
					$("#upsPowerInput_table span[name='aAvailablePower']").text(entity.aAvailablePower.toFixed(2));
					$("#upsPowerInput_table span[name='bUselessPower']").text(entity.bUselessPower.toFixed(2));
					$("#upsPowerInput_table span[name='cUselessPower']").text(entity.cUselessPower.toFixed(2));
					$("#upsPowerInput_table span[name='aUselessPower']").text(entity.aUselessPower.toFixed(2));
					$("#upsPowerInput_table span[name='bAvailablePower']").text(entity.bAvailablePower.toFixed(2));
					$("#upsPowerInput_table span[name='cAvailablePower']").text(entity.cAvailablePower.toFixed(2));
					$("#upsPowerInput_table span[name='aPowerFactor']").text(entity.aPowerFactor.toFixed(2));
					$("#upsPowerInput_table span[name='bPowerFactor']").text(entity.bPowerFactor.toFixed(2));
					$("#upsPowerInput_table span[name='cPowerFactor']").text(entity.cPowerFactor.toFixed(2));
					$("#upsPowerInput_table span[name='rate']").text(entity.rate.toFixed(2));
				}
				if(entity.equipmentid==$.websocket.sddly){//shi电量仪

					// $.websocket.sddlyall=entity
					entity.success=socketMsg.success
					$.websocket.sddlyall=entity
					if(entity.success){
						$("#equipentAll_table span[name='upsdly']").css("background-color","red");
					}else {
						$("#equipentAll_table span[name='upsdly']").css("background-color","green");
					}
					entity.abVoltage=(parseFloat(entity.aVoltage)+parseFloat(entity.bVoltage))/2*1.732
					entity.bcVoltage=(parseFloat(entity.cVoltage)+parseFloat(entity.bVoltage))/2*1.732
					entity.caVoltage=(parseFloat(entity.aVoltage)+parseFloat(entity.cVoltage))/2*1.732
					$("#powerOutput_table span[name='abVoltage']").text(entity.abVoltage.toFixed(2));
					$("#powerOutput_table span[name='bcVoltage']").text(entity.bcVoltage.toFixed(2));
					$("#powerOutput_table span[name='caVoltage']").text(entity.caVoltage.toFixed(2));
					$("#powerOutput_table span[name='aVoltage']").text(entity.aVoltage.toFixed(2));
					$("#powerOutput_table span[name='bVoltage']").text(entity.bVoltage.toFixed(2));
					$("#powerOutput_table span[name='cVoltage']").text(entity.cVoltage.toFixed(2));
					$("#powerOutput_table span[name='aCurrent']").text(entity.aCurrent.toFixed(2));
					$("#powerOutput_table span[name='bCurrent']").text(entity.bCurrent.toFixed(2));
					$("#powerOutput_table span[name='cCurrent']").text(entity.cCurrent.toFixed(2));

					entity.totalAvailablePowerMin=parseFloat(entity.aAvailablePower)+parseFloat(entity.bAvailablePower)+parseFloat(entity.cAvailablePower)
					$("#powerOutput_table span[name='totalAvailablePowerMin']").text(entity.totalAvailablePowerMin.toFixed(2));
					entity.totalUselessPowerMin=parseFloat(entity.aUselessPower)+parseFloat(entity.bUselessPower)+parseFloat(entity.cUselessPower)
					$("#powerOutput_table span[name='totalUselessPowerMin']").text(entity.totalUselessPowerMin.toFixed(2));
					//entity.totalPowerFactor=parseFloat(entity.aPowerFactor)+parseFloat(entity.bPowerFactor)+parseFloat(entity.cPowerFactor)
					$("#powerOutput_table span[name='totalPowerFactor']").text(entity.totalPowerFactor.toFixed(2));

					$("#powerOutput_table span[name='totalAvailablePowerMax']").text(entity.totalAvailablePowerMax.toFixed(2));
					$("#powerOutput_table span[name='totalUselessPowerMax']").text(entity.totalUselessPowerMax.toFixed(2));
					$("#powerOutput_table span[name='aAvailablePower']").text(entity.aAvailablePower.toFixed(2));
					$("#powerOutput_table span[name='bUselessPower']").text(entity.bUselessPower.toFixed(2));
					$("#powerOutput_table span[name='cUselessPower']").text(entity.cUselessPower.toFixed(2));
					$("#powerOutput_table span[name='aUselessPower']").text(entity.aUselessPower.toFixed(2));
					$("#powerOutput_table span[name='bAvailablePower']").text(entity.bAvailablePower.toFixed(2));
					$("#powerOutput_table span[name='cAvailablePower']").text(entity.cAvailablePower.toFixed(2));
					$("#powerOutput_table span[name='aPowerFactor']").text(entity.aPowerFactor.toFixed(2));
					$("#powerOutput_table span[name='bPowerFactor']").text(entity.bPowerFactor.toFixed(2));
					$("#powerOutput_table span[name='cPowerFactor']").text(entity.cPowerFactor.toFixed(2));
					$("#powerOutput_table span[name='rate']").text(entity.rate.toFixed(2));
				}
				if(entity.equipmentid==$.websocket.xfxt){//新风系统监控

					//$.websocket.xfxtall=entity
					entity.success=socketMsg.success
					$.websocket.xfxtall=entity
					if(entity.success){
						$("#equipentAll_table span[name='hwgy']").css("background-color","red");
					}else {
						$("#equipentAll_table span[name='hwgy']").css("background-color","green");
					}
					if(entity.switchingstate==0){
						$("#switchingstate").css("background-color","red");
					}else {
						$("#switchingstate").css("background-color","green");
					}
					$("#freshAir_table span[name='pm10']").text(entity.pm10+" ug/m³");
					$("#freshAir_table span[name='pm25']").text(entity.pm25+" ug/m³");
					$("#freshAir_table span[name='switchingstate']").text(entity.switchingstate);
					if(entity.workingmode==1){
						$("#freshAir_table span[name='workingmode']").text("手动");
					}else if(entity.workingmode==2) {
						$("#freshAir_table span[name='workingmode']").text("自动");
					}else{
						$("#freshAir_table span[name='workingmode']").text("定时");
					}
					if(entity.windspeed=='1'){
						$("#freshAir_table span[name='windspeed']").text('低档');
					}else if(entity.windspeed=='2') {
						$("#freshAir_table span[name='windspeed']").text('中档');
					}else if(entity.windspeed=='3') {
						$("#freshAir_table span[name='windspeed']").text('高速');
					}else if(entity.windspeed=='0') {
						$("#freshAir_table span[name='windspeed']").text('停止');
					}
					$("#freshAir_table span[name='temperature']").text(entity.temperature+" °C");
					$("#freshAir_table span[name='humidity']").text(entity.humidity+" %");
					$("#freshAir_table span[name='filtertime']").text(entity.filtertime);

					if(entity.switchingstate=='0'){
						$("#freshAir_table span[name='temperature']").text('-');
						$("#freshAir_table span[name='humidity']").text('-');
						$("#freshAir_table span[name='filtertime']").text('-');
						$("#freshAir_table span[name='pm10']").text('-');
						$("#freshAir_table span[name='workingmode']").text("-");
						$("#freshAir_table span[name='windspeed']").text('-');
						$("#freshAir_table span[name='pm25']").text('-');
					}
				}

				if(entity.equipmentid==$.websocket.kgl){//开关量

					//$.websocket.kglall=entity

					$.websocket.kglall=entity

					if(entity.di1==0){
						$("#cabinetUps_table span[name='di1']").css("background-color","green");
					}else {
						$("#cabinetUps_table span[name='di1']").css("background-color","red");
					}
					if(entity.di2==0){
						$("#cabinetUps_table span[name='di2']").css("background-color","green");
					}else {
						$("#cabinetUps_table span[name='di2']").css("background-color","red");
					}
					if(entity.di3==0){
						$("#cabinetUps_table span[name='di3']").css("background-color","green");
					}else {
						$("#cabinetUps_table span[name='di3']").css("background-color","red");
					}
					if(entity.di4==0){
						$("#cabinetUps_table span[name='di4']").css("background-color","green");
					}else {
						$("#cabinetUps_table span[name='di4']").css("background-color","red");
					}
					if(entity.di5==0){
						$("#cabinetUps_table span[name='di5']").css("background-color","green");
					}else {
						$("#cabinetUps_table span[name='di5']").css("background-color","red");
					}
					if(entity.di6==0){
						$("#cabinetUps_table span[name='di6']").css("background-color","green");
					}else {
						$("#cabinetUps_table span[name='di6']").css("background-color","red");
					}
					if(entity.di7==0){
						$("#cabinetUps_table span[name='di7']").css("background-color","green");
					}else {
						$("#cabinetUps_table span[name='di7']").css("background-color","red");
					}
					if(entity.di8==0){
						$("#cabinetUps_table span[name='di8']").css("background-color","green");
					}else {
						$("#cabinetUps_table span[name='di8']").css("background-color","red");
					}
					if(entity.do1==0){
						$("#cabinetUps_table span[name='do1']").css("background-color","green");
					}else {
						$("#cabinetUps_table span[name='do1']").css("background-color","red");
					}
					if(entity.do2==0){
						$("#cabinetUps_table span[name='do2']").css("background-color","green");
					}else {
						$("#cabinetUps_table span[name='do2']").css("background-color","red");
					}
					if(entity.do3==0){
						$("#cabinetUps_table span[name='do3']").css("background-color","green");
					}else {
						$("#cabinetUps_table span[name='do3']").css("background-color","red");
					}
					if(entity.do4==0){
						$("#cabinetUps_table span[name='do4']").css("background-color","green");
					}else {
						$("#cabinetUps_table span[name='do4']").css("background-color","red");
					}
					if(entity.do5==0){
						$("#cabinetUps_table span[name='do5']").css("background-color","green");
					}else {
						$("#cabinetUps_table span[name='do5']").css("background-color","red");
					}
					if(entity.do6==0){
						$("#cabinetUps_table span[name='do6']").css("background-color","green");
					}else {
						$("#cabinetUps_table span[name='do6']").css("background-color","red");
					}
					if(entity.do7==0){
						$("#cabinetUps_table span[name='do7']").css("background-color","green");
					}else {
						$("#cabinetUps_table span[name='do7']").css("background-color","red");
					}
					if(entity.do8==0){
						$("#cabinetUps_table span[name='do8']").css("background-color","green");
					}else {
						$("#cabinetUps_table span[name='do8']").css("background-color","red");
					}

				}
				if(entity.equipmentid==$.websocket.kglad88){//开关量

					//$.websocket.kglall=entity

					$.websocket.kglad88all=entity

					if(entity.di1==0){
						$("#cabinetUps_table span[name='dis1']").css("background-color","green");
					}else {
						$("#cabinetUps_table span[name='dis1']").css("background-color","red");
					}
					if(entity.di2==0){
						$("#cabinetUps_table span[name='dis2']").css("background-color","green");
					}else {
						$("#cabinetUps_table span[name='dis2']").css("background-color","red");
					}
					if(entity.di3==1){
						$("#cabinetUps_table span[name='dis3']").css("background-color","green");
					}else {
						$("#cabinetUps_table span[name='dis3']").css("background-color","red");
					}
					if(entity.di4==0){
						$("#cabinetUps_table span[name='dis4']").css("background-color","green");
					}else {
						$("#cabinetUps_table span[name='dis4']").css("background-color","red");
					}
					if(entity.di5==0){
						$("#cabinetUps_table span[name='dis5']").css("background-color","green");
					}else {
						$("#cabinetUps_table span[name='dis5']").css("background-color","red");
					}
					if(entity.di6==0){
						$("#cabinetUps_table span[name='dis6']").css("background-color","green");
					}else {
						$("#cabinetUps_table span[name='dis6']").css("background-color","red");
					}

					if(entity.do1==0){
						$("#cabinetUps_table span[name='dos1']").css("background-color","green");
					}else {
						$("#cabinetUps_table span[name='dis1']").css("background-color","red");
					}
					if(entity.do2==0){
						$("#cabinetUps_table span[name='dos2']").css("background-color","green");
					}else {
						$("#cabinetUps_table span[name='dis2']").css("background-color","red");
					}
					if(entity.do3==1){
						$("#cabinetUps_table span[name='dos3']").css("background-color","green");
					}else {
						$("#cabinetUps_table span[name='dos3']").css("background-color","red");
					}
					if(entity.do4==0){
						$("#cabinetUps_table span[name='dos4']").css("background-color","green");
					}else {
						$("#cabinetUps_table span[name='dos4']").css("background-color","red");
					}
					if(entity.do5==0){
						$("#cabinetUps_table span[name='dos5']").css("background-color","green");
					}else {
						$("#cabinetUps_table span[name='dos5']").css("background-color","red");
					}
					if(entity.do6==0){
						$("#cabinetUps_table span[name='dos6']").css("background-color","green");
					}else {
						$("#cabinetUps_table span[name='dos6']").css("background-color","red");
					}
				}


				if(entity.equipmentid==$.websocket.hwrt){//红外人体
					entity.success=socketMsg.success
					$.websocket.hwrtall=entity
					if(entity.success){
						$("#accessControl_table span[name='rthd']").css("background-color","red");
					}else {
						$("#accessControl_table span[name='rthd']").css("background-color","green");
					}
					if(entity.success){
						$("#equipentAll_table span[name='rthd']").css("background-color","red");
					}else {
						$("#equipentAll_table span[name='rthd']").css("background-color","green");
					}
					if(entity.state=='00'){
						$("#humanActiveInfrared_table span[name='state']").text('正常');
						$("#humanActiveInfrared_table span[name='state']").css('color','#00ff0c');
					}else if(entity.state=='01') {
						$("#humanActiveInfrared_table span[name='state']").text('报警');
					}else {
						$("#humanActiveInfrared_table span[name='state']").text('保留');
					}

					if(entity.sensorstate=='00'){
						$("#humanActiveInfrared_table span[name='sensorstate']").text('正常');
						$("#humanActiveInfrared_table span[name='sensorstate']").css('color','#00ff0c');
					}else if(entity.sensorstate=='01') {
						$("#humanActiveInfrared_table span[name='sensorstate']").text('故障');
					} else {
						$("#humanActiveInfrared_table span[name='sensorstate']").text('保留');
					}
					if(entity.batterystate=='00'){
						$("#humanActiveInfrared_table span[name='batterystate']").text('正常');
						$("#humanActiveInfrared_table span[name='batterystate']").css('color','#00ff0c');
					}else if(entity.batterystate=='01') {
						$("#humanActiveInfrared_table span[name='batterystate']").text('低电');
					}
					if(entity.tamperstate=='0'){
						$("#humanActiveInfrared_table span[name='tamperstate']").text('正常');
						$("#humanActiveInfrared_table span[name='tamperstate']").css('color','#00ff0c');
					}else if(entity.tamperstate=='1') {
						$("#humanActiveInfrared_table span[name='tamperstate']").text('被拆');
					}
					if(entity.keystate=='000'){
						$("#humanActiveInfrared_table span[name='keystate']").text('正常');
						$("#humanActiveInfrared_table span[name='keystate']").css('color','#00ff0c');
					}else if(entity.keystate=='001') {
						$("#humanActiveInfrared_table span[name='keystate']").text('测试');
					}
					$("#humanActiveInfrared_table span[name='crchighbytes']").text(entity.crchighbytes);
					$("#humanActiveInfrared_table span[name='crclowhbytes']").text(entity.crclowhbytes);
					$("#humanActiveInfrared_table span[name='frametail']").text(entity.frametail);
				}

				if(entity.equipmentid==$.websocket.hwgyq){//红外感应器数据
					entity.success=socketMsg.success
					$.websocket.hwgyqall=entity
					if(entity.success){
						$("#accessControl_table span[name='hwgy']").css("background-color","red");
					}else {
						$("#accessControl_table span[name='hwgy']").css("background-color","green");
					}

					if(entity.state=='00'){
						$("#infraredinduction_table span[name='state']").text('正常');
						$("#infraredinduction_table span[name='state']").css('color','#00ff0c');
					} else if(entity.state=='10'){
						$("#infraredinduction_table span[name='state']").text('故障');
					} else if(entity.state=='01'){
						$("#infraredinduction_table span[name='state']").text('告警');
					}
					if(entity.keystate=='000'){
						$("#infraredinduction_table span[name='keystate']").text('正常');
						$("#infraredinduction_table span[name='keystate']").css('color','#00ff0c');
					}else if(entity.keystate=='001') {
						$("#infraredinduction_table span[name='keystate']").text('测试');
					}else {
						$("#infraredinduction_table span[name='keystate']").text('保留');
					}
					if(entity.batterystate=='00'){
						$("#infraredinduction_table span[name='batterystate']").text('正常');
						$("#infraredinduction_table span[name='batterystate']").css('color','#00ff0c');
					}else if(entity.batterystate=='01') {
						$("#infraredinduction_table span[name='batterystate']").text('低电');
					}else {
						$("#infraredinduction_table span[name='batterystate']").text('保留');
					}
					if(entity.tamperstate=='0'){
						$("#infraredinduction_table span[name='tamperstate']").text('正常');
						$("#infraredinduction_table span[name='tamperstate']").css('color','#00ff0c');
					}else if(entity.tamperstate=='1') {
						$("#infraredinduction_table span[name='tamperstate']").text('被拆');
					}else {
						$("#infraredinduction_table span[name='tamperstate']").text('保留');
					}
					//$("#infraredinduction_table span[name='batterystate']").text(entity.batterystate);
					//$("#infraredinduction_table span[name='tamperstate']").text(entity.tamperstate);
					//$("#infraredinduction_table span[name='keystate']").text(entity.keystate);
					$("#infraredinduction_table span[name='voltage']").text(entity.voltage);
				}










			}
		}
	});
})(jQuery);